export default {
	designWidthSize: 375, //px
	designHightSize: 812, //px
	tabBarHeight: 37,
	windosData: {},
	printWindowSize(){
		console.log(`width: ${this.windosData.windowWidth} height: ${this.windosData.windowHeight}`)
	},
	changeWidthPx(px) {
		let windowsWidth = this.windosData.windowWidth
		if(!windowsWidth){
			console.log('找不到屏幕高度')
			return px
		}
		return px / this.designWidthSize * windowsWidth;
	},
	changeHeightPx(px) {
		let windowHeight = this.windosData.windowHeight
		if(!windowHeight){
			console.log('找不到屏幕高度')
			return px
		}
		return px / this.designHightSize * windowHeight;
	},
	screenMinHight(){
		let windowHeight = this.windosData.windowHeight
		if(!windowHeight){
			console.log('找不到屏幕高度')
			return designHightSize
		}
		return windowHeight - (this.tabBarHeight / 667 * windowHeight);
	},
	getTheTabBarHeight(){
		let windowHeight = this.windosData.windowHeight
		if(!windowHeight){
			console.log('找不到屏幕高度')
			return this.tabBarHeight
		}
		return this.tabBarHeight / 667 * windowHeight;
	},
	getTheStatusBarHeight(){
		return this.windosData.statusBarHeight + 5;
	},
	getTheTabNavHeight(){
		let add = this.windosData.system.indexOf('iOS') > -1?44:48;
		return this.windosData.statusBarHeight + add;
	}
}
